<!DOCTYPE html>
{% extends 'lms/base.html' %}
{% load static %}

{% block title %}
    -修改密码
{% endblock %}

{% block passHighlight %}
    active
{% endblock %}
{% block css %}
    {#    {% static 'lms/css/userCentre.css' %}#}
{% endblock %}

{% block main_block %}

    {% if changepasswordForm.errors %}
        <div class="alert alert-success" role="alert">
            <h4 class="alert-heading">密码修改失败</h4>
            <p>{{ changepasswordForm.errors }}</p>
            <hr>
            <p class="mb-0">如要修改请注意以上的错误</p>
        </div>
    {% endif %}
    <div>

        <form class="form-group" action="" method="POST">
            {% csrf_token %}

            <p><label for="id_old_password">旧密码:</label>
                <input type="password" name="old_password" autofocus=""
                       required="" id="id_old_password"></p>
            <p><label for="id_new_password1">新密码:</label>
                <input type="password" name="new_password1" required=""
                       id="id_new_password1"> <span class="helptext"></span>
            </p>
            <ul>
                <li>你的密码不能与你的其他个人信息太相似。</li>
                <li>你的密码必须包含至少 8 个字符。</li>
                <li>你的密码不能是大家都爱用的常见密码。</li>
                <li>你的密码不能全部为数字。</li>
            </ul>
            <p></p>
            <p><label for="id_new_password2">新密码确认:</label>
                <input type="password" name="new_password2" required="" id="id_new_password2"></p>
            <button class="btn btn-primary" type="submit">确定</button>
        </form>
        {#        <form class="form-group" action="" method="POST">#}
        {#            {% csrf_token %}#}
        {#            {{ changepasswordForm.as_p }}#}
        {#            <button class="btn btn-primary" type="submit">确定</button>#}
        {#        </form>#}

    </div>

{% endblock %}